<?php /* Smarty version 2.6.26, created on 2010-05-18 21:48:51
         compiled from editor.tpl */ ?>
<div class="simple_gallery_module_editor">    <h2>Galleri</h2>    <div class="simple_gallery_buttons">        <div class="add_image btnSkin" lang="<?php echo $this->_tpl_vars['identifier']; ?>
_imagelist">Tilføj billede</div>    </div>    <div class="clear"></div>    <strong>Billeder</strong>    <ul class="imagelist" id="<?php echo $this->_tpl_vars['identifier']; ?>
_imagelist">        <?php $_from = $this->_tpl_vars['data']['images']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['imagelist'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['imagelist']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['k'] => $this->_tpl_vars['i']):
        $this->_foreach['imagelist']['iteration']++;
?>        <li>            <input type="hidden" name="<?php echo $this->_tpl_vars['identifier']; ?>
[images][<?php echo $this->_foreach['imagelist']['iteration']-1; ?>
][title]" value="<?php echo $this->_tpl_vars['i']['title']; ?>
" />            <input type="hidden" name="<?php echo $this->_tpl_vars['identifier']; ?>
[images][<?php echo $this->_foreach['imagelist']['iteration']-1; ?>
][url]" value="<?php echo $this->_tpl_vars['i']['url']; ?>
" />            <input type="hidden" name="<?php echo $this->_tpl_vars['identifier']; ?>
[imageSort][sort][]" value="<?php echo $this->_foreach['imagelist']['iteration']-1; ?>
" />            <?php echo $this->_tpl_vars['i']['title']; ?>
            <a rel="lightbox" href="<?php echo $this->_tpl_vars['i']['url']; ?>
" class="simple_gallery_image_icon" title="<?php echo $this->_tpl_vars['i']['title']; ?>
">Lightbox</a>            <div class="simple_gallery_remove_image" onclick="removeElementsParent(this);">Fjern</div>        </li>        <?php endforeach; endif; unset($_from); ?>    </ul>    <div class="clear"></div>    <!--    DO NOT REMOVE THIS PART: START    -->    <input type="hidden" name="sort[]" value="<?php echo $this->_tpl_vars['identifier']; ?>
"/>    <input type="submit" value="Gem"/>    <!--    DO NOT REMOVE THIS PART: END    --></div><script type="text/javascript">    var identifier = "<?php echo $this->_tpl_vars['identifier']; ?>
";    //<?php echo '    function removeElementsParent(el){        $(el).parent().remove();    }    function childCount(selector){        if (!selector) return false;        return $(selector).children().length;    }    $(function(){        $(\'.simple_gallery_buttons .add_image\').click(function(e){            var imagelist = $("#"+$(this).attr("lang"));            openLibrary(function(u,t){;                var newTitle = t;                var newUrl = u;                var currentChildCount = childCount("#"+identifier+"_imagelist");                if(!imagelist)                    alert("Append list does not exist");                $(imagelist).appendDom([                    {                        tagName : "li",                        id : "listItem_"+currentChildCount,                        childNodes : [                            {                                tagName : "input",                                type : "hidden",                                name : identifier+"[images]["+currentChildCount+"][title]",                                value : newTitle                            },                            {                                tagName : "input",                                type : "hidden",                                name : identifier+"[images]["+currentChildCount+"][url]",                                value : newUrl                            },                            {                                tagName : "input",                                type : "hidden",                                name : identifier+"[imageSort][sort][]",                                value : currentChildCount                            },                            {                                tagName : "span",                                innerHTML : newTitle                            },                            {                                tagName : "a",                                innerHTML : "Lightbox",                                className : "simple_gallery_image_icon",                                title : newUrl                            },                            {                                tagName : "div",                                innerHTML : "Fjern",                                className : "simple_gallery_remove_image",                                onclick : function(){removeElementsParent(this);}                            }                        ]                    }                ]);                $("#listItem_"+currentChildCount).lightBox({                    overlayBgColor: \'#222\',                    overlayOpacity: 0.5,                    imageLoading: images_url+\'/images/lightbox-ico-loading.gif\',                    imageBtnClose: images_url+\'/images/lightbox-btn-close.gif\',                    imageBtnPrev: images_url+\'/images/lightbox-btn-prev.gif\',                    imageBtnNext: images_url+\'/images/lightbox-btn-next.gif\',                    imageBlank: images_url+\'/images/lightbox-blank.gif\',                    containerResizeSpeed: 200,                    txtImage: \'Billede\',                    txtOf: \'af\',                    keyToPrev:",",                    keyToNext:"."                });            });        });    });    //'; ?>
    var images_url = "<?php echo @_MODULEURL_; ?>
/LightBox";    //<?php echo '    $(function(){        $(\'a[rel*=lightbox]\').lightBox({            overlayBgColor: \'#222\',            overlayOpacity: 0.5,            imageLoading: images_url+\'/images/lightbox-ico-loading.gif\',            imageBtnClose: images_url+\'/images/lightbox-btn-close.gif\',            imageBtnPrev: images_url+\'/images/lightbox-btn-prev.gif\',            imageBtnNext: images_url+\'/images/lightbox-btn-next.gif\',            imageBlank: images_url+\'/images/lightbox-blank.gif\',            containerResizeSpeed: 200,            txtImage: \'Billede\',            txtOf: \'af\',            keyToPrev:",",            keyToNext:"."        });    });    //'; ?>
</script>